package org.bbmall.bean.member;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员月度趋势展示实体类
 * 对应数据库表：ads_member_trend_display
 */
@Data
@TableName("ads_member_trend_display")
public class AdsMemberTrendDisplay {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 统计年份
     */
    @TableField("stat_year")
    private Integer statYear;

    /**
     * 统计月份
     */
    @TableField("stat_month")
    private Integer statMonth;

    /**
     * 统计年月
     */
    @TableField("stat_year_month")
    private String statYearMonth;

    /**
     * 周期类型
     */
    @TableField("period_type")
    private String periodType;

    /**
     * 消费金额
     */
    @TableField("consumption_amount")
    private BigDecimal consumptionAmount;

    /**
     * 消费订单数
     */
    @TableField("consumption_orders")
    private Integer consumptionOrders;

    /**
     * 笔均金额
     */
    @TableField("avg_order_amount")
    private BigDecimal avgOrderAmount;

    /**
     * 会员总数
     */
    @TableField("total_members")
    private Integer totalMembers;

    /**
     * 新增会员
     */
    @TableField("new_members")
    private Integer newMembers;

    /**
     * 活跃会员
     */
    @TableField("active_members")
    private Integer activeMembers;

    /**
     * 新会员转化率
     */
    @TableField("new_member_conversion_rate")
    private BigDecimal newMemberConversionRate;

    /**
     * 消费金额环比
     */
    @TableField("consumption_amount_change")
    private BigDecimal consumptionAmountChange;

    /**
     * 新增会员环比
     */
    @TableField("new_members_change")
    private BigDecimal newMembersChange;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}